<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>MySQLi类</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mysqli.summary.html">« MySQLi 扩展的功能概述</a></li>
      <li style="float: right;"><a href="mysqli.affected-rows.html">mysqli::$affected_rows »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.mysqli.html">Mysqli</a></li>
    <li>MySQLi类</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.mysqli" class="reference">
 <h1 class="title">MySQLi类</h1>
 
 
 <div class="partintro"><p class="verinfo">(PHP 5, PHP 7, PHP 8)</p>
 

  <div class="section" id="mysqli.intro">
   <h2 class="title">简介</h2>
   <p class="para">
   代表PHP和Mysql数据库之间的一个连接。
   </p>
  </div>

 
  <div class="section" id="mysqli.synopsis">
   <h2 class="title">类摘要</h2>
 

   <div class="classsynopsis">
    <div class="ooclass"></div>
 

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">mysqli</strong>
     </span>
     {</div>

 
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis"><span class="type"><span class="type">int</span>|<span class="type">string</span></span> <var class="varname"><a href="mysqli.affected-rows.html">$<var class="varname">affected_rows</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">int</span> <var class="varname"><a href="mysqli.connect-errno.html">$<var class="varname">connect_errno</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <var class="varname"><a href="mysqli.connect-error.html">$<var class="varname">connect_error</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">int</span> <var class="varname">$<var class="varname">errno</var></var>;</div>
<div class="fieldsynopsis"><span class="type">array</span> <var class="varname"><a href="mysqli.error-list.html">$<var class="varname">error_list</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">string</span> <var class="varname"><a href="mysqli.error.html">$<var class="varname">error</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">int</span> <var class="varname"><a href="mysqli.field-count.html">$<var class="varname">field_count</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">string</span> <var class="varname"><a href="mysqli.get-client-info.html">$<var class="varname">client_info</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">int</span> <var class="varname"><a href="mysqli.get-client-version.html">$<var class="varname">client_version</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">string</span> <var class="varname"><a href="mysqli.get-host-info.html">$<var class="varname">host_info</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">string</span> <var class="varname"><a href="mysqli.get-proto-info.html">$<var class="varname">protocol_version</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">string</span> <var class="varname"><a href="mysqli.get-server-info.html">$<var class="varname">server_info</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">int</span> <var class="varname"><a href="mysqli.get-server-version.html">$<var class="varname">server_version</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">string</span> <var class="varname"><a href="mysqli.info.html">$<var class="varname">info</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <var class="varname"><a href="mysqli.insert-id.html">$<var class="varname">insert_id</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">string</span> <var class="varname"><a href="mysqli.sqlstate.html">$<var class="varname">sqlstate</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">int</span> <var class="varname"><a href="mysqli.thread-id.html">$<var class="varname">thread_id</var></a></var>;</div>
<div class="fieldsynopsis"><span class="type">int</span> <var class="varname"><a href="mysqli.warning-count.html">$<var class="varname">warning_count</var></a></var>;</div>

 
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mysqli_affected_rows</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$mysql</code></span>): <span class="type"><span class="type">int</span>|<span class="type">string</span></span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.autocommit.html" class="methodname">autocommit</a></span>(<span class="methodparam"><span class="type">bool</span> <code class="parameter">$mode</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mysqli.begin-transaction.html" class="methodname">begin_transaction</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>, <span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$name</code><span class="initializer"> = <strong><code>null</code></strong></span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mysqli.change-user.html" class="methodname">change_user</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$username</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$password</code></span>, <span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$database</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.character-set-name.html" class="methodname">character_set_name</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.close.html" class="methodname">close</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.commit.html" class="methodname">commit</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_connect_errno</strong></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_connect_error</strong></span>(): <span class="type"><span class="type">?</span><span class="type">string</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="function.mysqli-connect.html" class="methodname">connect</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$hostname</code><span class="initializer"> = ini_get(&quot;mysqli.default_host&quot;)</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$username</code><span class="initializer"> = ini_get(&quot;mysqli.default_user&quot;)</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$password</code><span class="initializer"> = ini_get(&quot;mysqli.default_pw&quot;)</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$database</code><span class="initializer"> = &quot;&quot;</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$port</code><span class="initializer"> = ini_get(&quot;mysqli.default_port&quot;)</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$socket</code><span class="initializer"> = ini_get(&quot;mysqli.default_socket&quot;)</span></span><br>): <span class="type"><span class="type void">void</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mysqli.debug.html" class="methodname">debug</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$options</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.dump-debug-info.html" class="methodname">dump_debug_info</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_errno</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$link</code></span>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_error_list</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$mysql</code></span>): <span class="type">array</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_error</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$mysql</code></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mysqli.execute-query.html" class="methodname">execute_query</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$query</code></span>, <span class="methodparam"><span class="type">?</span><span class="type"><span class="type">array</span><span class="type"></span></span> <code class="parameter">$params</code><span class="initializer"> = <strong><code>null</code></strong></span></span>): <span class="type"><span class="type"><a href="class.mysqli-result.html" class="type mysqli_result">mysqli_result</a></span>|<span class="type">bool</span></span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_field_count</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$mysql</code></span>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mysqli.get-charset.html" class="methodname">get_charset</a></span>(): <span class="type"><span class="type">?</span><span class="type">object</span></span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.get-client-info.html" class="methodname">get_client_info</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_get_client_version</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$link</code></span>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.get-connection-stats.html" class="methodname">get_connection_stats</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_get_host_info</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$link</code></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_get_proto_info</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$link</code></span>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_get_server_info</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$link</code></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_get_server_version</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$link</code></span>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mysqli.get-warnings.html" class="methodname">get_warnings</a></span>(): <span class="type"><span class="type"><a href="class.mysqli-warning.html" class="type mysqli_warning">mysqli_warning</a></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_info</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$link</code></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.init.html" class="methodname">init</a></span>(): <span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_insert_id</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$link</code></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.kill.html" class="methodname">kill</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$processid</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.more-results.html" class="methodname">more_results</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.multi-query.html" class="methodname">multi_query</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$query</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.next-result.html" class="methodname">next_result</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.options.html" class="methodname">options</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$option</code></span>, <span class="methodparam"><span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span> <code class="parameter">$value</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.ping.html" class="methodname">ping</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="mysqli.poll.html" class="methodname">poll</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$read</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$error</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$reject</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$sec</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$usec</code><span class="initializer"> = 0</span></span><br>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.prepare.html" class="methodname">prepare</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$query</code></span>): <span class="type"><a href="class.mysqli-stmt.html" class="type mysqli_stmt">mysqli_stmt</a></span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.query.html" class="methodname">query</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$query</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$resultmode</code><span class="initializer"> = MYSQLI_STORE_RESULT</span></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.real-connect.html" class="methodname">real_connect</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$username</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$passwd</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$dbname</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$port</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$socket</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = ?</span></span><br>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="function.mysqli-escape-string.html" class="methodname">escape_string</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$escapestr</code></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.real-query.html" class="methodname">real_query</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$query</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mysqli.reap-async-query.html" class="methodname">reap_async_query</a></span>(): <span class="type"><a href="class.mysqli-result.html" class="type mysqli_result">mysqli_result</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mysqli.refresh.html" class="methodname">refresh</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mysqli.release-savepoint.html" class="methodname">release_savepoint</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.rollback.html" class="methodname">rollback</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mysqli.savepoint.html" class="methodname">savepoint</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.select-db.html" class="methodname">select_db</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$dbname</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.set-charset.html" class="methodname">set_charset</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$charset</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_sqlstate</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$link</code></span>): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.ssl-set.html" class="methodname">ssl_set</a></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$cert</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$ca</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$capath</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$cipher</code></span><br>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.stat.html" class="methodname">stat</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.stmt-init.html" class="methodname">stmt_init</a></span>(): <span class="type"><a href="class.mysqli-stmt.html" class="type mysqli_stmt">mysqli_stmt</a></span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><a href="mysqli.store-result.html" class="methodname">store_result</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$option</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="class.mysqli-result.html" class="type mysqli_result">mysqli_result</a></span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_thread_id</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$link</code></span>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_thread_safe</strong></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mysqli.use-result.html" class="methodname">use_result</a></span>(): <span class="type"><span class="type"><a href="class.mysqli-result.html" class="type mysqli_result">mysqli_result</a></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="methodname"><strong>mysqli_warning_count</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <code class="parameter">$mysql</code></span>): <span class="type">int</span></div>

   }</div>

 
  </div>
 
 </div>
 
 


























































































































































































































































































































































































































































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="mysqli.affected-rows.html">mysqli::$affected_rows</a> — Gets the number of affected rows in a previous MySQL operation</li><li><a href="mysqli.autocommit.html">mysqli::autocommit</a> — 打开或关闭本次数据库连接的自动命令提交事务模式</li><li><a href="mysqli.begin-transaction.html">mysqli::begin_transaction</a> — Starts a transaction</li><li><a href="mysqli.change-user.html">mysqli::change_user</a> — Changes the user of the specified database connection</li><li><a href="mysqli.character-set-name.html">mysqli::character_set_name</a> — 返回当前数据库连接的默认字符编码</li><li><a href="mysqli.close.html">mysqli::close</a> — 关闭先前打开的数据库连接</li><li><a href="mysqli.commit.html">mysqli::commit</a> — 提交一个事务</li><li><a href="mysqli.connect-errno.html">mysqli::$connect_errno</a> — Returns the error code from last connect call</li><li><a href="mysqli.connect-error.html">mysqli::$connect_error</a> — Returns a description of the last connection error</li><li><a href="mysqli.construct.html">mysqli::__construct</a> — Open a new connection to the MySQL server</li><li><a href="mysqli.debug.html">mysqli::debug</a> — Performs debugging operations</li><li><a href="mysqli.dump-debug-info.html">mysqli::dump_debug_info</a> — 将调试信息输出到日志</li><li><a href="mysqli.errno.html">mysqli::errno</a> — 返回最近函数调用的错误代码</li><li><a href="mysqli.error-list.html">mysqli::$error_list</a> — Returns a list of errors from the last command executed</li><li><a href="mysqli.error.html">mysqli::$error</a> — Returns a string description of the last error</li><li><a href="mysqli.execute-query.html">mysqli::execute_query</a> — Prepares, binds parameters, and executes SQL statement</li><li><a href="mysqli.field-count.html">mysqli::$field_count</a> — Returns the number of columns for the most recent query</li><li><a href="mysqli.get-charset.html">mysqli::get_charset</a> — Returns a character set object</li><li><a href="mysqli.get-client-info.html">mysqli::$client_info</a> — 获取 MySQL 客户端信息</li><li><a href="mysqli.get-client-version.html">mysqli_get_client_version</a> — 作为一个整数返回MySQL客户端的版本</li><li><a href="mysqli.get-connection-stats.html">mysqli::get_connection_stats</a> — 返回客户端连接的统计数据</li><li><a href="mysqli.get-host-info.html">mysqli::$host_info</a> — 返回一个表述使用的连接类型的字符串</li><li><a href="mysqli.get-proto-info.html">mysqli::$protocol_version</a> — 返回MySQL使用的协议版本号</li><li><a href="mysqli.get-server-info.html">mysqli::$server_info</a> — 返回MySQL服务器的版本号</li><li><a href="mysqli.get-server-version.html">mysqli::$server_version</a> — 作为一个整数返回MySQL服务器的版本</li><li><a href="mysqli.get-warnings.html">mysqli::get_warnings</a> — Get result of SHOW WARNINGS</li><li><a href="mysqli.info.html">mysqli::$info</a> — 返回最近执行的 SQL 语句的信息</li><li><a href="mysqli.init.html">mysqli::init</a> — 初始化 MySQLi 并返回一个资源类型的值，这个值可以作为 mysqli_real_connect() 函数的传入参数</li><li><a href="mysqli.insert-id.html">mysqli::$insert_id</a> — 返回最后一条插入语句产生的自增 ID</li><li><a href="mysqli.kill.html">mysqli::kill</a> — 让服务器杀掉一个 MySQL 线程</li><li><a href="mysqli.more-results.html">mysqli::more_results</a> — 检查批量查询中是否还有查询结果</li><li><a href="mysqli.multi-query.html">mysqli::multi_query</a> — 执行查询</li><li><a href="mysqli.next-result.html">mysqli::next_result</a> — 为读取 multi_query 执行之后的下一个结果集做准备</li><li><a href="mysqli.options.html">mysqli::options</a> — 设置选项</li><li><a href="mysqli.ping.html">mysqli::ping</a> — ping 一个连接，或者如果连接处于断开状态，重新连接</li><li><a href="mysqli.poll.html">mysqli::poll</a> — 轮询连接</li><li><a href="mysqli.prepare.html">mysqli::prepare</a> — 准备执行一个 SQL 语句</li><li><a href="mysqli.query.html">mysqli::query</a> — 对数据库执行一次查询</li><li><a href="mysqli.real-connect.html">mysqli::real_connect</a> — 建立一个 MySQL 服务器连接</li><li><a href="mysqli.real-escape-string.html">mysqli::real_escape_string</a> — 根据当前连接的字符集，对于 SQL 语句中的特殊字符进行转义</li><li><a href="mysqli.real-query.html">mysqli::real_query</a> — 执行一个mysql查询</li><li><a href="mysqli.reap-async-query.html">mysqli::reap_async_query</a> — 获取异步查询的结果</li><li><a href="mysqli.refresh.html">mysqli::refresh</a> — 刷新</li><li><a href="mysqli.release-savepoint.html">mysqli::release_savepoint</a> — 从当前事务的保存点中移除一个命名保存点</li><li><a href="mysqli.rollback.html">mysqli::rollback</a> — 回退当前事务</li><li><a href="mysqli.savepoint.html">mysqli::savepoint</a> — 在当前事务中增加一个命名保存点</li><li><a href="mysqli.select-db.html">mysqli::select_db</a> — 选择用于数据库查询的默认数据库</li><li><a href="mysqli.set-charset.html">mysqli::set_charset</a> — 设置默认字符编码</li><li><a href="mysqli.sqlstate.html">mysqli::$sqlstate</a> — 返回上一次 SQL 操作的 SQLSTATE 错误信息</li><li><a href="mysqli.ssl-set.html">mysqli::ssl_set</a> — 使用 SSL 建立到数据库之间的安全连接</li><li><a href="mysqli.stat.html">mysqli::stat</a> — 获取当前系统状态信息</li><li><a href="mysqli.stmt-init.html">mysqli::stmt_init</a> — 初始化一条语句并返回一个用于mysqli_stmt_prepare(调用)的对象</li><li><a href="mysqli.store-result.html">mysqli::store_result</a> — 转移上一次查询返回的结果集</li><li><a href="mysqli.thread-id.html">mysqli::$thread_id</a> — 返回当前连接的线程 ID</li><li><a href="mysqli.thread-safe.html">mysqli::thread_safe</a> — 返回是否是线程安全的</li><li><a href="mysqli.use-result.html">mysqli::use_result</a> — Initiate a result set retrieval</li><li><a href="mysqli.warning-count.html">mysqli::$warning_count</a> — Returns the number of warnings from the last query for the given link</li></ul>
</div>
</div></div></body></html>